package com.shrct.businessprocess.purchase.impl;

import com.shrct.businessprocess.project.RCProjectMoney;
import com.shrct.businessprocess.purchase.RCBaseProductPurchaseBudget;
import com.shrct.businessprocess.purchase.RCTransferCostService;
import com.shrct.businessprocess.purchase.RCTransformCostPayProcess;
import com.shrct.businessprocess.purchase.impl.RCTransformCostPayProcessImpl;
import edu.fudan.mylang.pf.BaseService;
import edu.fudan.mylang.pf.IObjectFactory;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.purchase.RCTransferCostService")
public class RCTransferCostServiceImpl extends BaseService implements RCTransferCostService {
  @Autowired
  private IObjectFactory entities;
  
  public RCTransformCostPayProcess startTransferCostProcess(final RCProjectMoney amount, final RCBaseProductPurchaseBudget source, final RCBaseProductPurchaseBudget target, final String comment) {
    RCTransformCostPayProcess _create = RCTransformCostPayProcessImpl.create(this.entities);
    final Procedure1<RCTransformCostPayProcess> _function = new Procedure1<RCTransformCostPayProcess>() {
        public void apply(final RCTransformCostPayProcess it) {
          it.start(amount, source, target, comment);
        }
      };
    RCTransformCostPayProcess _doubleArrow = ObjectExtensions.<RCTransformCostPayProcess>operator_doubleArrow(_create, _function);
    return _doubleArrow;
  }
}
